home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 August / macformat-027.iso / mac / Shareware City / Developers / Oberon⁄F / System / Docu / Views (.txt) < prev    next >
Encoding:
Oberon Document  |  1994-06-07  |  33.2 KB  |  478 lines  |  [oODC/obnF]

  1. Documents.StdDocumentDesc
  2. Documents.DocumentDesc
  3. Containers.ViewDesc
  4. Views.ViewDesc
  5. Stores.StoreDesc
  6. Documents.ModelDesc
  7. Containers.ModelDesc
  8. Models.ModelDesc
  9. Stores.ElemDesc
  10. TextViews.StdViewDesc
  11. TextViews.ViewDesc
  12. TextModels.StdModelDesc
  13. TextModels.ModelDesc
  14. TextModels.AttributesDesc
  15. Geneva
  16. TextRulers.StdRulerDesc
  17. TextRulers.RulerDesc
  18. TextRulers.StdStyleDesc
  19. TextRulers.StyleDesc
  20. TextRulers.AttributesDesc
  21. Geneva
  22. HostPictures.StdViewDesc
  23. Geneva
  24. Dialog
  25. Views
  26. Files
  27. Ports
  28. Domains
  29. Fonts
  30. Stores
  31. Models
  32. Controllers
  33. Geneva
  34. model
  35. controller
  36. controller
  37. uld be
  38. Geneva
  39. Geneva
  40. 5.7 Views
  41. DEFINITION Views;
  42.     IMPORT Domains, Files, Fonts, Stores, Ports, Models;
  43.     CONST
  44.         undefined = 0; infinite = 29000 * Ports.mm;
  45.         transparent = 0FF000000H;
  46.         deep = FALSE; shallow = TRUE;
  47.         keepFrames = FALSE; rebuildFrames = TRUE;
  48.     TYPE
  49.         View = POINTER TO ViewDesc;
  50.         ViewDesc = RECORD (Stores.StoreDesc)
  51.             context-: Models.Context;
  52.             PROCEDURE (v: View) Clone (): View;
  53.             PROCEDURE (v: View) CopyFrom (source: View);
  54.             PROCEDURE (v: View) ThisModel (): Models.Model;
  55.             PROCEDURE (v: View) CopyModelFrom (source: View; shallow: BOOLEAN);
  56.             PROCEDURE (v: View) Flush;
  57.             PROCEDURE (v: View) InitContext (context: Models.Context);
  58.             PROCEDURE (v: View) ConsiderFocusRequestBy (view: View);
  59.             PROCEDURE (v: View) Neutralize;
  60.             PROCEDURE (v: View) NewFrame (host: Frame): Frame;
  61.             PROCEDURE (v: View) Background (): Ports.Color;
  62.             PROCEDURE (v: View) Restore (f: Frame; l, t, r, b: LONGINT);
  63.             PROCEDURE (v: View) RestoreMarks (f: Frame; l, t, r, b: LONGINT);
  64.             PROCEDURE (v: View) HandleModelMsg (VAR msg: Models.Message);
  65.             PROCEDURE (v: View) HandleViewMsg (f: Frame; VAR msg: Message);
  66.             PROCEDURE (v: View) HandleCtrlMsg (f: Frame; VAR msg: ControllerMessage; VAR focus: View);
  67.             PROCEDURE (v: View) HandlePropMsg (VAR p: PropMessage)
  68.         END;
  69.         Alien = POINTER TO AlienDesc;
  70.         AlienDesc = RECORD (ViewDesc)
  71.             store-: Stores.Alien
  72.         END;
  73.         Message = RECORD (Domains.Message)
  74.             view-: View
  75.         END;
  76.         NotifyMsg = RECORD (Message)
  77.             id: LONGINT;
  78.             checkGuards: BOOLEAN
  79.         END;
  80.         Frame = POINTER TO FrameDesc;
  81.         FrameDesc = RECORD (Ports.FrameDesc)
  82.             l-, t-, r-, b-: LONGINT;
  83.             view-: View;
  84.             target-, front-: BOOLEAN;
  85.             PROCEDURE (f: Frame) Close
  86.         END;
  87.         RootFrame = POINTER TO RootFrameDesc;
  88.         RootFrameDesc = RECORD (FrameDesc)
  89.             flags-: SET
  90.         END;
  91.         PropMessage = RECORD (Domains.Message) END;
  92.         CtrlMessage = RECORD END;
  93.         CtrlMsgHandler = PROCEDURE (op: INTEGER; f, g: Frame; VAR msg: CtrlMessage;
  94.                                                             VAR target, front: BOOLEAN);
  95.         Title = ARRAY 64 OF CHAR;
  96.     PROCEDURE Broadcast (v: View; VAR msg: Message);
  97.     PROCEDURE Domaincast (domain: Domains.Domain; VAR msg: Message);
  98.     PROCEDURE BeginModification (v: View);
  99.     PROCEDURE EndModification (v: View);
  100.     PROCEDURE BeginScript (v: View; name: Domains.OpName; VAR script: Domains.Operation);
  101.     PROCEDURE EndScript (v: View; script: Domains.Operation);
  102.     PROCEDURE Do (v: View; name: Domains.OpName; op: Domains.Operation);
  103.     PROCEDURE LastOp (v: View): Domains.Operation;
  104.     PROCEDURE Bunch (v: View);
  105.     PROCEDURE StopBunching (v: View);
  106.     PROCEDURE Update (v: View; rebuild: BOOLEAN);
  107.     PROCEDURE UpdateIn (v: View; l, t, r, b: LONGINT; rebuild: BOOLEAN);
  108.     PROCEDURE ReadView (VAR rd: Stores.Reader; VAR v: View);
  109.     PROCEDURE WriteView (VAR wr: Stores.Writer; v: View);
  110.     PROCEDURE CopyOf (v: View; shallow: BOOLEAN): View;
  111.     PROCEDURE ReadFont (VAR rd: Stores.Reader; VAR f: Fonts.Font);
  112.     PROCEDURE WriteFont (VAR wr: Stores.Writer; f: Fonts.Font);
  113.     PROCEDURE IsPageFrame (f: Frame): BOOLEAN;
  114.     PROCEDURE InstallFrame (host: Frame; view: View; x, y, level: LONGINT; focus: BOOLEAN);
  115.     PROCEDURE ThisFrame (host: Frame; view: View): Frame;
  116.     PROCEDURE FrameAt (host: Frame, x, y: LONGINT): Frame;
  117.     PROCEDURE OldView (loc: Files.Locator; name: Files.Name): View;
  118.     PROCEDURE RegisterView (view: View; loc: Files.Locator; name: Files.Name);
  119.     PROCEDURE Open (view: View; loc: Files.Locator; name: Files.Name);
  120.     PROCEDURE OpenAux (view: View; title: Title);
  121.     PROCEDURE Deposit (view: View);
  122.     PROCEDURE RestoreDoman (domain: Domains.Domain);
  123.     PROCEDURE Scroll (v: View; dx, dy: LONGINT);
  124.     PROCEDURE SetDir (d: Directory);
  125.     PROCEDURE MarkBorders (root: RootFrame);
  126.     PROCEDURE MarkBorder (host: Frame; v: View; l, t, r, b: LONGINT);
  127.     PROCEDURE Fetch (VAR view: View);
  128.     PROCEDURE Available (): LONGINT;
  129.     PROCEDURE ClearQueue;
  130.     PROCEDURE RemoveFrame (host, f: Frame);
  131.     PROCEDURE RemoveFrames (host: Frame; l, t, r, b: LONGINT);
  132.     PROCEDURE ScrollFrame (f: Frame; dx, dy: LONGINT);
  133.     PROCEDURE BroadcastModelMsg (f: Frame; VAR msg: Models.Message);
  134.     PROCEDURE BroadcastViewMsg (f: Frame; VAR msg: Message);
  135.     PROCEDURE ForwardCtrlMsg (f: Frame; VAR msg: CtrlMessage);
  136.     PROCEDURE HandleCtrlMsg (op: INTEGER; f, g: Frame; VAR msg: CtrlMessage;
  137.                                                     VAR target, front: BOOLEAN);
  138.     PROCEDURE SetRoot (root: RootFrame; view: View; target, front: BOOLEAN; flags: SET);
  139.     PROCEDURE AdaptRoot (root: RootFrame);
  140.     PROCEDURE RootOf (f: Frame): RootFrame;
  141.     PROCEDURE UpdateRoot (root: RootFrame; l, t, r, b: LONGINT; rebuild: BOOLEAN);
  142.     PROCEDURE RestoreRoot (root: RootFrame; l, t, r, b: LONGINT);
  143.     PROCEDURE ValidateRoot (root: RootFrame);
  144.     PROCEDURE InitCtrl (p: CtrlMsgHandler);
  145. END Views.
  146. Picture 5.7a Model-View-Controller Separation
  147. A view is a rectangular display object which provides visual presentation of data. Views are storable, and may be embedded recursively.
  148. A view usually contain a Models.Model which represents some data, and a Controllers.Controller which provides interaction of the view with the user. There may be several views for each model simultaneously, but at most one controller per view.
  149. If several views share the same model, every change of the model must cause all its views to update their contents accordingly. Module Models provides a messaging mechanism through which visible views can be notified of model modifications, and thus re-establish the display's consistency.
  150. It is possible to implement views which do not contain a model. These views cannot use the messaging mechanism of module Models. Therefore, such views usually don't share data and are independent from each other.
  151. It is also possible to implement views which do not contain a controller. This is possible because all messages to a controller are sent to the controller's view, not directly to the controller itself. Thus a view can decide whether to handle these messages itself, or whether to forward them to a controller. Simple views rarely contain a controller.
  152. Because a view is an extension of a Stores.Store, it can be embedded in a model, such that it is externalized and internalized as part of this model. This makes it possible to realize compound documents, which contain views containing views containing views...
  153. When a view needs to draw to the screen (or printer), it can do this through a frame. A frame is an access path to the port on which the view is presented. Since several windows may show the same document with its hierarchy of views, one and the same view may be visible several times simultaneously. This results in several frames for the same view simultaneously, and therefore in the need to update a view change in several frames.
  154. In general, the reaction to a model modification happens in two steps. In the first step, the nature of the model's change is broadcast to all visible views, using the model broadcast mechanism of module Models. This causes every visible view to update its own state, if necessary. In the second step, every view which has changed its state uses the view broadcast mechanism of module Views, to notify all frames for this view. In fact, since frames are usually not extended, the view itself performs the update for each of its frames. This second broadcast step is normally invisible to the programmer, because he merely needs to determine the view's region which needs updating. The actual update of this region in each of its frames is done by the framework.
  155. A view may behave differently depending on the model in which it is embedded, i.e. depending on its context. For this purpose, a variable of type Models.Context is carried by a view, as a link to its container.
  156. For every user interaction, e.g. the press of a key, a view must be defined which should handle this interaction, i.e. a so-called focus. Oberon doesn't know which view is the current focus. Oberon only provides a strategy which decides which window is focus. Since a window may contain a hierarchy of views, a view which has received an interaction message - a controller message - must decide on its own whether it is the focus itself, or whether it contains another view which might be focus instead. In the former case, it handles the messages itself, in the latter case, it forwards the message to this view.
  157. Every window contains a tree of frames. This tree corresponds to the visible views of the window. Every view may only draw inside its own borders, drawing outside of its borders must be prevented. Frames provide the necessary clipping facility. The management of the frame tree and of clipping is largely transparent to the view programmer.
  158. CONST undefined
  159. This value can be used to denote the width or height of a view as currently undefined.
  160. CONST infinite
  161. This value can be used to denote the width or height of a view as unlimited, or as too expensive to always be updated exactly.
  162. CONST transparent
  163. A view may be asked for its background color. In this case, the view may either return a Ports.Color value, or the value transparent. The latter value means that the view's container must find another source for a background color, i.e. for the color which is used to erase the background before the foreground is restored (use Update or UpdateIn to restore a view's area in all its frames). Transparency is useful if several views are superimposed on each other, which naturally occurs in a compound document.
  164. CONST deep, shallow
  165. There are two ways that a view can be copied: deep or shallow. This distinction arises from the fact that a view can carry two types of data: data that it owns completely, and data that it can share with other views. The most important example of the latter is the view's model, if it has one.
  166. When a view is copied, it must be decided whether shareable state should actually be shared with the copy (shallow copy), or whether an independent copy of this state should be created (deep copy). For this purpose, a view's CopyModelFrom procedure has a Boolean parameter, which can take on one of the above constants.
  167. CONST keepFrames, rebuildFrames
  168. When part of a view's are must be restored (in every frame on it), there are two possible kinds of restoration: a frame may be kept as it is and only its contents be redrawn, or it may be rebuilt, i.e. newly allocated, set up, and redrawn. The latter is less efficient than the former, and only necessary if the following holds: the view must be a container, and the operation which changed the view might have modified a subview's bounding box (and thus invalidated its subframes). In the rare case where frames are extended, it could sometimes also become necessary to rebuild the frames on a view.
  169. TYPE View
  170. Interface, Extension
  171. A view is a storable object which may contain a model, possibly maintains a scroll position in this model, and generates frames for its display when needed. A view can be regarded as a special editor, and advanced views (containers) are able to contain arbitrary other views as part of their editable data (i.e. of their model).
  172. Views are allocated by specific view directories, e.g. TextViews.dir.
  173. Views are used by commands which manipulate the visual presentation of data.
  174. Views are extended for new kinds of data to be presented visually. Besides the implementation of new commands, the implementation of new view extensions is the central activity of Oberon programming.
  175. Restore is the only procedure which necessarily must be extended in an extension of View.
  176. Clone may be extended in order to return a narrowed result type, typically in extended interface types.
  177. Internalize, Externalize, and CopyFrom must be extended in views which contain persistent mutable data.
  178. ThisModel and CopyModelFrom must be extended in views which contain models.
  179. ConsiderFocusRequestBy may be extended in container views.
  180. Background must be extended in views which have a non-transparent background colors.
  181. RestoreMarks and Neutralize must be extended in views which may contain marks like selections or carets.
  182. HandleModelMsg must be extended in views which support partial view updates after a model change.
  183. HandleViewMsg must be extended in views which support marks, or which don't use the delayed update mechanism for some other reason.
  184. HandleCtrlMsg must be extended in editable views.
  185. HandlePropMsg must be extended in views which support properties (not described in this documentation).
  186. Init, InitContext, and NewFrame are usually not extended.
  187. context-: Models.Context
  188. The view's context links the view to its container. Communication between view and container occurs via the context. A context belongs (and is managed by) the container, but carried by the view.
  189. PROCEDURE (v: View) Clone (): View
  190. Default, Extension
  191. Result type is narrowed to a view.
  192. Clone is called by the view's container, before CopyFrom is called.
  193. Clone is sometimes extended in order to yield a narrower result type, as is done here for (s: Store) Clone (): Store.
  194. PROCEDURE (v: View) CopyFrom (source: View)
  195. Extension
  196. This procedure copies a view's non-shareable state, i.e. not its model.
  197. CopyFrom calls v.Init.
  198. CopyFrom is called by the view's container, at most once.
  199. CopyFrom is extended to copy additional view-specific data.
  200. Super call at the beginning is mandatory.
  201. ~v.init    20
  202. source # NIL    21
  203. source.init    22
  204. v.init
  205. PROCEDURE (v: View) ThisModel (): Models.Model
  206. Default
  207. Returns the model which v displays. The default implementation returns NIL.
  208. ThisModel is called internally.
  209. ThisModel is extended by views which contain models. Its result type may be narrowed.
  210. PROCEDURE (v: View) CopyModelFrom (source: View; shallow: BOOLEAN)
  211. This procedure copies a view's shareable data, in particular its model. v may either be assigned the same model as source (shallow copy), or an independent copy of it (deep copy).
  212. CopyModelFrom is called internally.
  213. CopyModelForm is extended by views which contain shareable mutable state, e.g. a model.
  214. Super call at the beginning is mandatory.
  215. PROCEDURE (v: View) Flush
  216. Empty
  217. A view which caches some data should implement the Flush procedure, which should clear the cache. This procedure may be called by the framework after a trap occurred, in order to reset a view to a defined state.
  218. Flush is called by the framework under certain circumstances.
  219. Flush is extended for views which may contain cached data.
  220. PROCEDURE (v: View) InitContext (context: Models.Context)
  221. Assigns context to v.context.
  222. context # NIL    20
  223. v.context = NIL    21
  224. v.context = context
  225. PROCEDURE (v: View) ConsiderFocusRequestBy (view: View);
  226. A subview of v may request to become focus. Its container may or may not grant this request.
  227. ConsiderFocusRequestBy is called by a subview.
  228. ConsiderFocusRequestBy is extended in a container view.
  229. PROCEDURE (v: View) Neutralize
  230. Empty
  231. This procedure should remove all marks that a view carries.
  232. Neutralize is called by the framework.
  233. Neutralize is extended by views which may contain marks.
  234. PROCEDURE (v: View) NewFrame (host: Frame): Frame
  235. Default
  236. Generates a frame for the view. The frame in which this new frame will be contained is passed as parameter. It can be used to provide special host-frame or port-specific frame implementations. However, normally the default behavior of NewFrame is sufficient, which is to provide a generic Views.Frame as result.
  237. NewFrame is called internally.
  238. NewFrame is extended in views which need extended view frames.
  239. host # NIL    20
  240. result # NIL
  241. result.view = NIL
  242. PROCEDURE (v: View) Background (): Ports.Color
  243. Default
  244. This procedure returns the background color of the view. Its default implementation yields transparent.
  245. Background is called internally.
  246. Background is extended if a view needs a non-transparent background color.
  247. PROCEDURE (v: View) Restore (f: Frame; l, t, r, b: LONGINT)
  248. Interface
  249. Restore view v via frame f. Only the rectangle (l, t, r, b), which is given in universal coordinates, needs to be restored. Since drawing is clipped to this rectangle automatically, it is sometimes the best solution to simply restore the whole view's contents. However, often it is significantly faster to restore only the contents of the rectangle.
  250. If necessary, the size of the view can be determined by calling v.context.GetSize.
  251. Restore is called internally.
  252. Restore must be extended in every view extension.
  253. f # NIL    20
  254. f.view = v    21
  255. v.context # NIL    22
  256. PROCEDURE (v: View) RestoreMarks (f: Frame; l, t, r, b: LONGINT)
  257. Empty
  258. Restore all marks (in particular any selection) of view v via frame f. Only the rectangle (l, t, r, b), which is given in universal coordinates, needs to be restored.
  259. RestoreMarks is called internally.
  260. RestoreMarks is extended in views which support any kind of marks, e.g. selection, caret, or focus marks.
  261. f # NIL    20
  262. f.view = v    21
  263. v.context # NIL    22
  264. PROCEDURE (v: View) HandleModelMsg (VAR msg: Models.Message)
  265. Empty
  266. Message handler for model messages.
  267. HandleModelMsg is called internally.
  268. HandleModelMsg is extended in views which support partial updates after a model modification.
  269. msg.model # NIL    20
  270. msg.model = v.ThisModel()    21
  271. PROCEDURE (v: View) HandleViewMsg (f: Frame; VAR msg: Message)
  272. Empty
  273. Message handler for view messages.
  274. HandleViewMsg is called internally.
  275. HandleViewMsg is extended in views which support marks (e.g. selection marks), and in views which support different frame contents for the same view (a rare case).
  276. f # NIL    20
  277. f.view = v    21
  278. v.context # NIL    22
  279. msg.view = v  OR  msg.view = NIL    23
  280. PROCEDURE (v: View) HandleCtrlMsg (f: Frame; VAR msg: CtrlMessage; VAR focus: View)
  281. Empty
  282. Message handler for messages to the focus.
  283. HandleCtrlMsg is called by the view's container.
  284. HandleCtrlMsg is extended in editable views.
  285. f # NIL    20
  286. f.view = v    21
  287. v.context # NIL    22
  288. focus = NIL    23
  289. PROCEDURE (v: View) HandlePropMsg (VAR p: PropMessage)
  290. Empty
  291. Property messages can be passed to a view via its HandlePropMsg procedure.
  292. HandlePropMsg is called by the view's container.
  293. HandlePropMsg is extended in views which support properties (not described here).
  294. TYPE Alien
  295. Extension
  296. If the internalization of a view fails, either because its implementing module(s) cannot be loaded, or because it cancelled internalization e.g. because of a version conflict, an alien is produced instead (this happens in procedure ReadView). An alien is immutable and doesn't contain a model. It contains an alien store which can be inspected to determine the type of the alien, and the cause for it to be an alien.
  297. Every container must be able to operate even if one or several of its embedded views are aliens. If the view's model is an alien store, the view may turn itself into an alien.
  298. Aliens are allocated in ReadView.
  299. Aliens are never extended.
  300. store-: Stores.Alien
  301. The alien store which has been generated by a Stores.Reader during internalization of the view.
  302. TYPE Message
  303. Interface, Extension
  304. Base type of all view messages. Such messages are sent when a view's state has changed, in order to render the display consistent again. There may be several frames displaying the same view, such that every one of them needs to be updated.
  305. Messages are sent by views when their states have changed and if they cannot use Oberon's delayed update mechanism. This is true mainly when drawing marks, e.g. selection marks.
  306. Messages are extended to indicate what kind of update should be performed on a frame.
  307. view-: View
  308. The view which has changed. If view = NIL, all frames with the same domain are notified of the view change.
  309. TYPE NotifyMsg
  310. Extension
  311. This message notifies all visible views about a change in an interactor's state (-> 5.9 Dialog).
  312. NotifyMsg is sent by an interactor's Notify and CheckGuards procedures.
  313. NotifyMsg is never extended.
  314. id: LONGINT
  315. Identification of the interactor or of one of its fields.
  316. checkGuards: BOOLEAN
  317. Determines whether controls (not described here) should check their guards.
  318. TYPE Frame
  319. Extension
  320. Extension of a Ports.Frame. All input and output operations of a view pass through a frame. A frame manages the whole layout of views on a port, including clipping. Model and view messages are broadcast along frame trees. A frame tree's internal structure is hidden. Frames are volatile objects, they are allocated and released by Oberon whenever ncecessary, e.g. when the frame's window is zoomed. Thus they cannot be used to carry application-specific state, except for caches.
  321. Frames are allocated by a view's NewFrame procedure.
  322. Frames are managed internally, and passed as parameters to view procedures whenever necessary.
  323. Frames are sufficient for most purposes, and thus rarely extended.
  324. l-, t-, r-, b-: LONGINT    0 <= l <= r  &  0 <= t <= b
  325. The visible area of the view in this frame.
  326. view-: View    view # NIL
  327. The frame's view.
  328. target-, front-: BOOLEAN
  329. Flags which tell whether the frame is part of the target or front window, or both if the front window is target as well.
  330. PROCEDURE (f: Frame) Close
  331. Empty
  332. Closes the frame.
  333. Close calls ConnectTo(NIL).
  334. Close is used and extended internally.
  335. f.view = NIL
  336. f.rider = NIL
  337. TYPE RootFrame
  338. This type is used internally.
  339. flags-: SET
  340. Window-specific flags. Reserved for future use.
  341. TYPE PropMessage
  342. Interface, Extension
  343. Use its alias Properties.Message instead (properties are not described here).
  344. TYPE CtrlMessage
  345. Interface
  346. Base type of all controller messages. Use its alias Controllers.Message instead.
  347. TYPE CtrlMsgHandler
  348. Used internally.
  349. TYPE Title
  350. Type for view titles, e.g. in windows.
  351. PROCEDURE Broadcast (v: View; VAR msg: Message)
  352. Broadcast msg for view. Before broadcasting, parameter v is assigned to the message's view-Field. The actual broadcast only takes place if v.domain # NIL.
  353. Broadcast is called by a view whenever its state has changed and the delayed restore mechanism is not sufficient, e.g. to update frame-specific marks.
  354. v # NIL    20
  355. msg.view = v
  356. PROCEDURE Domaincast (domain: Domains.Domain; VAR msg: Message)
  357. Broadcasts msg inside domain.
  358. PROCEDURE BeginModification (v: View)
  359. PROCEDURE EndModification (v: View)
  360. PROCEDURE BeginScript (v: View; name: Domains.OpName; VAR script: Domains.Operation)
  361. PROCEDURE EndScript (v: View; script: Domains.Operation)
  362. PROCEDURE Do (v: View; name: Domains.OpName; op: Domains.Operation)
  363. PROCEDURE LastOp (v: View): Domains.Operation
  364. PROCEDURE Bunch (v: View)
  365. PROCEDURE StopBunching (v: View)
  366. These procedures handle modifications of a view. They are used in the same way as their model counterparts in module Models (-> 5.6 Models).
  367. PROCEDURE Update (v: View)
  368. Causes view v to be restored, in all frames displaying v. The update occurs delayed, after the currently executing command has terminated.
  369. v # NIL    20
  370. PROCEDURE UpdateIn (v: View; l, t, r, b: LONGINT)
  371. Causes rectangle (l, t, r, b) of view v to be restored, in all frames displaying v. The update occurs delayed, after the currently executing command has terminated.
  372. v # NIL    20
  373. PROCEDURE ReadView (VAR rd: Stores.Reader; VAR v: View)
  374. Reads view v, using reader rd. If internalization is not possible, an alien view is returned.
  375. PROCEDURE WriteView (VAR wr: Stores.Writer; v: View)
  376. Writes view v, using writer wr. Alien views are handled correctly.
  377. PROCEDURE CopyOf (v: View; shallow: BOOLEAN): View
  378. Returns a shallow or deep copy of v.
  379. v # NIL    20
  380. v.init    21
  381. result # NIL
  382. PROCEDURE ReadFont (VAR rd: Stores.Reader; VAR f: Fonts.Font)
  383. Reads a font from a reader.
  384. f # NIL
  385. PROCEDURE WriteFont (VAR wr: Stores.Writer; f: Fonts.Font)
  386. Writes a font to a writer.
  387. f # NIL    20
  388. PROCEDURE IsPageFrame (f: Frame): BOOLEAN
  389. This function can be used to determine whether f's view is currently being restored on a printer or preview port.
  390. f # NIL    20
  391. PROCEDURE InstallFrame (host: Frame; view: View; x, y, level: LONGINT; focus: BOOLEAN)
  392. If view has no corresponding embedded frame in host, Install allocates and installs a new one for it, otherwise the existing frame is kept. Parameters x and y give the position of the view's top-left corner relative to the container view's (i.e. host.view) top-left corner. The frame ordering can be influenced by passing a view level at which view lies logically. Levels need not be unique (pass 0 if you don't care, e.g. if you never have overlapping frames). A frame always lies "above" other frames with smaller levels. Parameter focus tells whether the frame is part of the focus path.
  393. host # NIL    20
  394. view # NIL    21
  395. context # NIL    22
  396. PROCEDURE ThisFrame (host: Frame; view: View): Frame
  397. Searches the embedded frame of host which contains view view.
  398. host # NIL    20
  399. result = NIL
  400.     view = NIL OR  not found
  401. result # NIL
  402.     view # NIL &  found
  403.     result.view = view
  404. PROCEDURE FrameAt (host: Frame; x, y: LONGINT): Frame
  405. Searches the embedded frame of host which contains point (x, y).
  406. host # NIL    20
  407. result = NIL
  408.     no embedded frame at (x, y)
  409. result # NIL
  410.     result contains (x, y)
  411. PROCEDURE OldView (loc: Files.Locator; name: Files.Name): View
  412. This procedure looks up a file, reads in the document in this file, and then returns the root view of this document. If the file is already opened in a window, the root view of this window's document is returned.
  413. loc # NIL    20
  414. name # ""    21
  415. reult = NIL
  416.     loc.res # 0
  417. result # NIL
  418.     loc.res = 0
  419.     result.context # NIL
  420. PROCEDURE RegisterView (view: View; loc: Files.Locator; name: Files.Name)
  421. Saves the document in which view is embedded in a file.
  422. view # NIL    20
  423. view.init    21
  424. loc # NIL    22
  425. name # ""    23
  426. PROCEDURE Open (view: View; loc: Files.Locator; name: Files.Name)
  427. Open view in a new window. (loc, name) determines the file associated with view, if there is any.
  428. view # NIL    20
  429. (loc = NIL) = (name = "")    21
  430. PROCEDURE OpenAux (view: View; title: Title)
  431. Opens view in an auxiliary window with title title.
  432. view # NIL    20
  433. title # ""    21
  434. PROCEDURE Deposit (view: View)
  435. Deposit a view for later use, typically for opening it in a window, or for pasting it to the focus.
  436. Deposit is used only by allocation commands, i.e. commands which allocate and then deposit a concrete view type.
  437. view # NIL    20
  438. PROCEDURE RestoreDomain (domain: Domains.Domain)
  439. This procedures forces a restoration of all update regions on views of domain.
  440. Normally, the display is updated in a delayed fashion, i.e. an update region is built for all invalid view areas (using Update and UpdateIn), and the display update according to this region is performed when the framework is idle, i.e. between commands. However, sometimes it is necessary to enforce a display update during a command, for which this procedure can be used. The need for enforced update comes from scrolling: if a view should be scrolled, the effect of scrolling should become immediately visible.
  441. PROCEDURE Scroll (v: View; dx, dy: LONGINT)
  442. Scroll the contents of each frame on v by (dx, dy).
  443. v # NIL    20
  444. PROCEDURE SetDir (d: Directory)
  445. Assigns directory.
  446. d # NIL    20
  447. stdDir' = NIL
  448.     stdDir = d
  449. stdDir' # NIL
  450.     stdDir = stdDir'
  451. dir = d
  452. The following procedures are used internally:
  453. PROCEDURE MarkBorder (host: Frame; view: View; l, t, r, b: LONGINT)
  454. PROCEDURE ForwardCtrlMsg (f: Frame; VAR msg: CtrlMessage)
  455. PROCEDURE Fetch (view: View)
  456. PROCEDURE Available (): LONGINT
  457. PROCEDURE ClearQueue
  458. PROCEDURE MarkBorders (root: RootFrame)
  459. PROCEDURE RemoveFrame (host, f: Frame)
  460. PROCEDURE RemoveFrames (host: Frame; l, t, r, b: LONGINT)
  461. PROCEDURE ScrollFrame (f: Frame; dx, dy: LONGINT)
  462. PROCEDURE BroadcastModelMsg (f: Frame; VAR msg: Models.Message)
  463. PROCEDURE BroadcastViewMsg (f: Frame; VAR msg: Message)
  464. PROCEDURE HandleCtrlMsg (op: INTEGER; f, g: Frame; VAR msg: CtrlMessage;
  465.                                                         VAR target, front: BOOLEAN)
  466. PROCEDURE SetRoot (root: RootFrame; view: View; target, front: BOOLEAN; flags: SET)
  467. PROCEDURE AdaptRoot (root: RootFrame)
  468. PROCEDURE UpdateRoot (root: RootFrame; l, t, r, b: LONGINT; rebuild: BOOLEAN)
  469. PROCEDURE RestoreRoot (root: RootFrame; l, t, r, b: LONGINT)
  470. PROCEDURE ValidateRoot (root: RootFrame)
  471. PROCEDURE InitCtrl (p: CtrlMsgHandler)
  472. TextControllers.StdCtrlDesc
  473. TextControllers.ControllerDesc
  474. Containers.ControllerDesc
  475. Controllers.ControllerDesc
  476. Geneva
  477. Documents.ControllerDesc
  478.